<h3>Moving <%= @person.full_name %> to Different Household</h3>

<% form_remote_tag :url => {:action => 'commit_move', :mover_id => @person.id, :new_household_id => @new} do %>

<table border="1" cellspacing="0" cellpadding="4" width="100%">
	<tr style="background-color:#536A97;color:#FFFFFF;">
		<td>
			<h3>Current Household >>></h3>
		</td>
		<td>
			<h3>>>> Move to This Household</h3>
		</td>
	</tr>
	<tr>
		<td>
				
		</td>
		<td>
			<div id="search-panel" style="size:12px;text-align:left;">
				<% form_remote_tag :url => {:action => 'search_for_new_household'} do %>
				<span id='progress' style='display:none;float:right;'><img src='/images/working.gif'></span>
				<label>Last Name:</label><br>
				<%= text_field_tag :household_name %>
				<%= submit_to_remote 'SearchBtn', 'Search', :url => {:action => 'search_for_new_household', :current_household_id => @person.household } %>
				<% end %>
			</div>
			<div id="results-panel" style="size:12px;text-align:left;font-weight:normal;background-color:#f4ebc4;">
				
			</div>
		</td>
	</tr>
	<tr>
		<td>
			<div>
				<strong>Household Info</strong>
			</div>
			<div>
				<%= @person.household.household_name rescue nil %> (#<%= @person.household.id rescue nil %>)<br>
				<%= @person.household.address_block rescue nil %>
			</div>
		</td>
		<td>
			<div id="household-area">
				
			</div>
		</td>
	</tr>
	<tr>
		<td>
			<div>
				<strong>Household People</strong>
			</div>
			<div>
				<%= @person.household.people.collect {|p| p.first_name}.to_sentence rescue nil %>
			</div>
		</td>
		<td>
			<div id="people-area">
				
			</div>
		</td>
	</tr>
	<tr>
		<td>
			<div>
				<strong>Admin</strong>
			</div>
			<div>
				<table border="0" cellspacing="0" cellpadding="0" width="100%">
					<tr>
						<td>Created at: </td>
						<td><%= @person.household.created_at.strftime('%m/%d/%Y') rescue nil %></td>
						<td>Updated at: </td>
						<td><%= @person.household.updated_at.strftime('%m/%d/%Y') rescue nil %></td>
					</tr>
					<tr>
						<td>Created by: </td>
						<td><%= @person.household.created_by rescue nil %></td>
						<td>Updated by: </td>
						<td><%= @person.household.updated_by rescue nil %></td>
					</tr>
				</table>
			</div>
		</td>
		<td>
			<div id="admin-area">
				
			</div>
		</td>
	</tr>
</table>

<div id="new-household-info">
	<%= render :partial => "new_id" %>
</div>


<%= submit_tag "Move Person" %>
<% end %>